import { getBannerListApi } from "@/apis/home.js";
import { ref, onMounted } from "vue";


export function useBanner() {


  // 获取轮播图
  let BannerList = ref([]);
  const getBannerList = async () => {
    const res = await getBannerListApi({
      distributionSite: "2",
    });
    BannerList.value = res.result;
  };
  onMounted(() => {
    getBannerList();
  });

  return {
    BannerList
  }
}
